import { mock } from 'mockjs';

const getNotices = (req, res) =>
  res.json([
    {
      id: mock('@id'),
      avatar: 'https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png',
      title: '你收到了 14 份新周报',
      datetime: '2019-06-01',
      type: 'notification',
    },
    {
      id: mock('@id'),
      avatar: 'https://gw.alipayobjects.com/zos/rmsportal/OKJXDXrmkNshAMvwtvhu.png',
      title: '你推荐的 李华 已通过第三轮面试',
      datetime: '2019-05-24',
      type: 'notification',
    },
    {
      id: '000000003',
      avatar: 'https://gw.alipayobjects.com/zos/rmsportal/kISTdvpyTAhtGxpovNWd.png',
      title: '赵丽 创建了土地复垦项目团队',
      datetime: '2019-08-07',
      read: true,
      type: 'notification',
    },
    {
      id: '000000004',
      avatar: 'https://gw.alipayobjects.com/zos/rmsportal/GvqBnKhFgObvnSGkDsje.png',
      title: '左侧图标用于区分不同的类型',
      datetime: '2019-08-07',
      type: 'notification',
    },
    {
      id: '000000005',
      avatar: 'https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png',
      title: '内容不要超过两行字，超出时自动截断',
      datetime: '2019-08-07',
      type: 'notification',
    },
    {
      id: '000000006',
      avatar: 'https://gw.alipayobjects.com/zos/rmsportal/fcHMVNCjPOsbUGdEduuv.jpeg',
      title: '赵愤 评论了你',
      description: '再见再见再见',
      datetime: '2019-08-07',
      type: 'message',
      clickClose: true,
    },
    {
      id: '000000007',
      avatar: 'https://gw.alipayobjects.com/zos/rmsportal/fcHMVNCjPOsbUGdEduuv.jpeg',
      title: '朱法 回复了你',
      description: '互动一下，赞一个',
      datetime: '2019-08-07',
      type: 'message',
      clickClose: true,
    },
    {
      id: '000000008',
      avatar: 'https://gw.alipayobjects.com/zos/rmsportal/fcHMVNCjPOsbUGdEduuv.jpeg',
      title: '不知名标题',
      description: '重构-改善既有代码结构',
      datetime: '2019-08-07',
      type: 'message',
      clickClose: true,
    },
    {
      id: '000000009',
      title: '每月读书分享会',
      description: '任务需要在 2019-06-12 19:00 前启动',
      extra: '未开始',
      status: 'todo',
      type: 'event',
    },
    {
      id: '000000010',
      title: 'develop分支 代码检查',
      description: '无憾 提交于 2019-05-06，需在 2019-05-30 前完成代码合并任务',
      extra: '马上到期',
      status: 'urgent',
      type: 'event',
    },
    {
      id: '000000011',
      title: '毕业晚会筹备工作',
      description: '指派 遏抑 于 2019-06-05 前完成预演并发布表演项目',
      extra: '已耗时 8 天',
      status: 'doing',
      type: 'event',
    },
    {
      id: '000000012',
      title: 'SMS 产品迭代',
      description: 'Misky 提交于 2019-05-12，需在 2019-05-25 前完成代码变更任务',
      extra: '进行中',
      status: 'processing',
      type: 'event',
    },
  ]);

export default {
  'GET /api/notices': getNotices,
};
